import { defineStore } from 'pinia'
import {reqCategoryHeaderAPI} from "@/api/header.js";

export const useCategoryStore = defineStore('category', {
  state: () => ({
   categoryList: []
  }),
  actions: {
    //   获取顶部分类菜单
    async getCategoryList() {
        const res = await reqCategoryHeaderAPI()
        this.categoryList = res.data.result
    }
  }
})